<?php




class ErrorModule extends Module
{
	public function __config(){}
	
	public function __default(){
		$this->VAction();
	}
	
	public function __dispatch(){}
	
	public function VAction()
	{
		$a = intval($this->site->arguments[2]);
		if ( $a==404 ) $this->Fire404();
		elseif ( $a==403 ) $this->Fire403();
		elseif ( $a==400 ) $this->Fire400();
		elseif ( $a==500 ) $this->Fire500();
		else $this->FireUndef();
	}
	
	public function ViewAction()
	{
		$this->VAction();
	}
	
	public function ShowAction()
	{
		$this->VAction();
	}
	
	public function EAction()
	{
		$this->VAction();
	}
	
	public function Fire404()
	{
		die("Error 404!");
	}
	
	public function Fire403()
	{
		die("Error 403!");
	}
	
	public function Fire400()
	{
		die("Error 400!");
	}
	
	public function Fire500()
	{
		die("Error 500!");
	}
	
	public function FireUndef()
	{
		die("Undefined error!");
	}
}